<html>
	<head>
		<title>Rediger producent</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	</head>
	<body>
		<p><?php echo $message; ?></p>
		<div>
			<div>
				<?php foreach($producenter as $producent) :?>
				
				<div class='item'><?php echo $producent['prodnavn']?></div>
				<div class='rediger_knap'><?php echo anchor('admin/producent_rediger/' . $producent['prodID'], 'Rediger') ?></div>
				<div class='slet_knap'><?php echo anchor('admin/producent_slet/' . $producent['prodID'], 'Slet') ?></div>
				
				<?php endforeach;?>
			</div>
			<div>
			<?php 
			/*
			echo isset($valgt_producent)?'true':'false';
			echo isset($foobar)?'true':'false';
			echo isset($valgt_producent)?'true':'false';
			
			echo site_url('admin/producent_gem/' . (isset($valgt_producent)?$valgt_producent['prodID']:'')); 
			*/
			
			?>
				<form method='post' action='<?php echo site_url('admin/producent_gem/' . (isset($valgt_producent)?$valgt_producent['prodID']:'')); ?>'>
				<?php //overskrift 	tekst 	image ?> 
					<p><label for='prodnavn'>Producent Navn:</label><br/>
					<input type='text' name='prodnavn' value='<?php echo (isset($valgt_producent))?$valgt_producent['prodnavn']:''; ?>' /></p>
		
					<p><input type='submit' value='Rediger'/></p>
				</form>
			</div>
		</div>
		<?php echo anchor('admin/producent', 'Opret ny producent')?>
		<a href='<?php echo site_url('Admin/') ?>'> 
			Tilbage til Admin
		</a>
	</body>
</html>